<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddColumnOnlineStatusAndModerateStatusAndPublishStatusToColumns extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
       Schema::table('columns', function (Blueprint $table) {

            $table->unsignedTinyInteger('online_status')->default(0);
            $table->unsignedTinyInteger('moderate_status')->default(0);
            $table->unsignedTinyInteger('publish_status')->default(0);
            $table->string('moderate_by')->default('0')->nullable();
            $table->timestamp('moderate_at')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropColumn('online_status');
        Schema::dropColumn('moderate_status');
        Schema::dropColumn('publish_status');
        Schema::dropColumn('moderate_by');
        Schema::dropColumn('moderate_at');
    }
}
